//
// Created by twetec on 25-6-18.
//

#ifndef NETWORK_PROBER_LOGGER_RELEASE_LOGGER_H
#define NETWORK_PROBER_LOGGER_RELEASE_LOGGER_H

namespace spdlog
{
class logger;
}

namespace network_prober::logger
{
class ReleaseLogger
{
public:
    void init();                         // 初始化
    static ReleaseLogger &getInstance(); // 获取实例

private:
    ReleaseLogger();  // 构造函数私有化
    ~ReleaseLogger(); // 析构函数私有化

    ReleaseLogger(const ReleaseLogger &) = delete;            // 禁用默认拷贝构造函数（初始化赋值时调用）
    ReleaseLogger &operator=(const ReleaseLogger &) = delete; // 禁用默认拷贝赋值（初始化后，再赋值时调用）

    ReleaseLogger(ReleaseLogger &&) = delete;            // 针对右值
    ReleaseLogger &operator=(ReleaseLogger &&) = delete; // 针对右值

private:
    std::shared_ptr<spdlog::logger> m_logger{nullptr};
};
}

#endif //NETWORK_PROBER_LOGGER_RELEASE_LOGGER_H
